<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class User</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class User</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">User</p>
<p class="description"><p>Used for user management. Some examples below:</p><p>== GENERAL USAGE ===</p><p>This class can be used to simply get access to  details on a user. Using this code:</p><p>$User = User::getInstance( $id );</p><p>you can gain access to user info. If no $id is  provided then the constructor will check for  currently a currently logged in user id</p><p>=== VERIFY LOGIN ===</p><p>if( User::verify( ) ){    // user is logged in  }</p><p>=== LOGIN USER ===</p><p>This is usefull in the case of creating another  login area for the CMS, through the use of a  plugin. You can see how it works in admin/login.php  Basically you can use the static method &quot;login&quot; to log  the user in:</p><p>if( User::login( $email, $password, $permissions, $instance ) ){ 	$User = User::getInstance( );  	// user is logged in  }  else  	// user login failed</p><p>An array of permissions required to log into the  area can also be passed. The last paramater decides  whether to create a new instance of the class for the  user if login is successful</p><p>=== CHECK USER PERMISSIONS ===</p><p>This class also manages group permissions for the  user. To check wether the user has permission to do  something use the following syntax, where $section  is a permission string ( see the key table below ):</p><p>$User = User::getInstance( );</p><p>if( $User-&gt;hasPerm( $string ){    // user has permission to access this of the system  }</p><p>The string above can be anything from the table below,  or if plugins are installed there may be other  keys - refer to the plugin documentation for details on  that.</p><p>+---------------+----------------------------+  |      a        |      login to admin area   |  |      e        |      edit pages            |  |      c        |      create pages          |  |      d        |      delete pages          |  |      t        |      manage trash          |  |      o        |      order pages           | // @todo make order pages perms work  |      s	   |	  edit settings	        |  |      u	   |      edit users	        |  +---------------+----------------------------+</p><p>The class can also be used to check if the user has  permission to edit a certain page. The function accepts  an array of page permissions, or the string of perms  directly from the database.</p><p>if( $User-&gt;adminPagePerm( $perm_array ) ){    // user has permission to edit page  }</p><p>When using the pagePerm function it handles group  permissions as well internally, so there is no need  to run hasPerm if pagePerm is run.</p><p>=== DATA &amp; OPTIONS ===</p><p>Not all required data on users can be stored in the users table.  This class provides two alternatives to storing data for users:</p><p>Data can be stored in the data column in the users table -  a JSON encoded string of user data, so it's sufficient for data  that does not need to be indexed.</p><p>It can also be stored using the options methods which use the  options table (for general CMS options/settings) to store data.  This table takes the form of name, value and stores data very simply.  Note: It is advisable to take a look at the database structure.  Using this method extra data can be stored and indexed.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Conor Mac Aoidh &lt;<a href="mailto:conormacaoidh@gmail.com">conormacaoidh@gmail.com</a>&gt;</li>
				<li><span class="field">license:</span> <a href="http://furasta.org/licence.txt">The BSD License</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="__inc---class---User.php.html">/_inc/class/User.php</a> (line <span class="field">117</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																												<div class="method-definition">
					static 						<span class="method-result">bool</span>
										<a href="#createUserDirs" title="details" class="method-name">createUserDirs</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">bool</span>
										<a href="#destroyCookie" title="details" class="method-name">destroyCookie</a>
										()
									</div>
																																								<div class="method-definition">
					static 						<span class="method-result">instance</span>
										<a href="#getInstance" title="details" class="method-name">getInstance</a>
											([<span class="var-type">int</span>&nbsp;<span class="var-name">$id</span> = <span class="var-default">false</span>])
									</div>
																																																																																<div class="method-definition">
					static 						<span class="method-result">bool</span>
										<a href="#login" title="details" class="method-name">login</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$password</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$permissions</span> = <span class="var-default">array( )</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$instance</span> = <span class="var-default">false</span>], <span class="var-type">bool</span>&nbsp;<span class="var-name">$instance,</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">bool</span>
										<a href="#loginHash" title="details" class="method-name">loginHash</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$userid</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$hash</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$permissions</span> = <span class="var-default">array( )</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$instance</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#logout" title="details" class="method-name">logout</a>
										()
									</div>
																																								<div class="method-definition">
					static 						<span class="method-result">array</span>
										<a href="#permToArray" title="details" class="method-name">permToArray</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$permString</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">bool</span>
										<a href="#removeUserDirs" title="details" class="method-name">removeUserDirs</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>)
									</div>
																																<div class="method-definition">
					static 						<span class="method-result">bool</span>
										<a href="#verify" title="details" class="method-name">verify</a>
										()
									</div>
								
												<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#adminPagePerm" title="details" class="method-name">adminPagePerm</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$perm</span>)
									</div>
																																<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#email" title="details" class="method-name">email</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#frontendPagePerm" title="details" class="method-name">frontendPagePerm</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$perm</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getData" title="details" class="method-name">getData</a>
										()
									</div>
																								<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getOption" title="details" class="method-name">getOption</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getOptions" title="details" class="method-name">getOptions</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#groups" title="details" class="method-name">groups</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#hasFilePerm" title="details" class="method-name">hasFilePerm</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#hash" title="details" class="method-name">hash</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#hasPerm" title="details" class="method-name">hasPerm</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$perm</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#id" title="details" class="method-name">id</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#isSuperUser" title="details" class="method-name">isSuperUser</a>
										()
									</div>
																																								<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#name" title="details" class="method-name">name</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#password" title="details" class="method-name">password</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">perm</span>
										<a href="#perm" title="details" class="method-name">perm</a>
										()
									</div>
																																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setCookie" title="details" class="method-name">setCookie</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#setOption" title="details" class="method-name">setOption</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodcreateUserDirs" id="createUserDirs"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method createUserDirs</span> (line <span class="line-number">795</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">createUserDirs</p>
<p class="description"><p>creates the directory structure for users</p></p>
	<ul class="tags">
				<li><span class="field">todo:</span> update to file manager</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">bool</span>
		<span class="method-name">
			createUserDirs
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$id</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddestroyCookie" id="destroyCookie"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method destroyCookie</span> (line <span class="line-number">526</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">destroyCookie</p>
<p class="description"><p>Destroys the users cookie if one is set</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">bool</span>
		<span class="method-name">
			destroyCookie
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method getInstance</span> (line <span class="line-number">337</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">getInstance</p>
<p class="description"><p>gets an instance by id</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">instance</span>
		<span class="method-name">
			getInstance
		</span>
					([<span class="var-type">int</span>&nbsp;<span class="var-name">$id</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodlogin" id="login"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method login</span> (line <span class="line-number">419</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">login</p>
<p class="description"><p>attempts to login the user, returns  false on failure</p><p>uses the performLogin method, for more detail  on parameters see that method</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">bool</span>
		<span class="method-name">
			login
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$password</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$permissions</span> = <span class="var-default">array( )</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$instance</span> = <span class="var-default">false</span>], <span class="var-type">bool</span>&nbsp;<span class="var-name">$instance,</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$email</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$password</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$permissions</span><span class="var-description">: ( groups in array )</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$instance,</span><span class="var-description">: create new instance of user after successful login</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$instance</span>			</li>
				</ul>
		
			
	</div>
<a name="methodloginHash" id="loginHash"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method loginHash</span> (line <span class="line-number">444</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">loginHash</p>
<p class="description"><p>allows users to login using a hash key, works  much the same as the login function</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">bool</span>
		<span class="method-name">
			loginHash
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$userid</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$hash</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$permissions</span> = <span class="var-default">array( )</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$instance</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$userid</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$hash</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$permissions</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$instance</span>			</li>
				</ul>
		
			
	</div>
<a name="methodlogout" id="logout"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method logout</span> (line <span class="line-number">505</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">logout</p>
<p class="description"><p>logs out the current user</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">void</span>
		<span class="method-name">
			logout
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodpermToArray" id="permToArray"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method permToArray</span> (line <span class="line-number">779</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">permToArray</p>
<p class="description"><p>converts a perm string ( comma delimited ) to  an array of perms, example:</p><p>input: &quot;a,c,p,t&quot;  output: array( 'a', 'c', 'p', 't' )</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">array</span>
		<span class="method-name">
			permToArray
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$permString</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$permString</span>			</li>
				</ul>
		
			
	</div>
<a name="methodremoveUserDirs" id="removeUserDirs"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method removeUserDirs</span> (line <span class="line-number">821</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">removeUserDirs</p>
<p class="description"><p>removes the directory structure for users</p></p>
	<ul class="tags">
				<li><span class="field">todo:</span> update to file manager</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">bool</span>
		<span class="method-name">
			removeUserDirs
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodverify" id="verify"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method verify</span> (line <span class="line-number">463</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">verify</p>
<p class="description"><p>checks if the user is logged in</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">bool</span>
		<span class="method-name">
			verify
		</span>
				()
			</div>
	
		
			
	</div>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">367</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">__construct</p>
<p class="description"><p>sets up the user. will take an id  but will use session id if isset and  no id given</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodadminPagePerm" id="adminPagePerm"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">adminPagePerm</span> (line <span class="line-number">629</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">adminPagePerm</p>
<p class="description"><p>used to check if the user has permission  to edit the page, pass the pages permissions  string</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			adminPagePerm
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$perm</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$perm</span>			</li>
				</ul>
		
			
	</div>
<a name="methodemail" id="email"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">email</span> (line <span class="line-number">862</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">email</p>
<p class="description"><p>accessor method for user email</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			email
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodfrontendPagePerm" id="frontendPagePerm"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">frontendPagePerm</span> (line <span class="line-number">701</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">frontendPagePerm</p>
<p class="description"><p>used to check if the user has permission  to view the page, pass the pages permissions  string</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			frontendPagePerm
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$perm</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$perm</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetData" id="getData"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getData</span> (line <span class="line-number">928</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">getData</p>
<p class="description"><p>accessor method for the data array</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getData
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetOption" id="getOption"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getOption</span> (line <span class="line-number">966</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">getOption</p>
<p class="description"><p>gets the value of a specified user option. these methods  manages the storage of the options so a simple option name  is required like &quot;user_rating&quot; or &quot;address&quot;</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getOption
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetOptions" id="getOptions"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getOptions</span> (line <span class="line-number">941</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">getOptions</p>
<p class="description"><p>this function gets options for this user from the  options table and stores them in the options array</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getOptions
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgroups" id="groups"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">groups</span> (line <span class="line-number">913</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">groups</p>
<p class="description"><p>accessor method for groups, returns an array in format:</p><p>group_id =&gt; group_class_instance</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			groups
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodhasFilePerm" id="hasFilePerm"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">hasFilePerm</span> (line <span class="line-number">586</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">hasFilePerm</p>
<p class="description"><p>checks if a user has permission to access a file  in the user files directory</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			hasFilePerm
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodhash" id="hash"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">hash</span> (line <span class="line-number">887</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">hash</p>
<p class="description"><p>accessor method for user hash</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			hash
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodhasPerm" id="hasPerm"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">hasPerm</span> (line <span class="line-number">557</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">hasPerm</p>
<p class="description"><p>used to check if user has permission  to access certain areas of the cms</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			hasPerm
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$perm</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$perm</span>			</li>
				</ul>
		
			
	</div>
<a name="methodid" id="id"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">id</span> (line <span class="line-number">837</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">id</p>
<p class="description"><p>accessor method for user id</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			id
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodisSuperUser" id="isSuperUser"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">isSuperUser</span> (line <span class="line-number">1010</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">isSuperUser</p>
<p class="description"><p>returns true if the users is the  _superuser</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			isSuperUser
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodname" id="name"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">name</span> (line <span class="line-number">850</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">name</p>
<p class="description"><p>accessor method for user name</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			name
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodpassword" id="password"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">password</span> (line <span class="line-number">875</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">password</p>
<p class="description"><p>accessor method for user password</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> md5</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			password
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodperm" id="perm"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">perm</span> (line <span class="line-number">899</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">perm</p>
<p class="description"><p>accessor method for user permissions</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">perm</span>
		<span class="method-name">
			perm
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetCookie" id="setCookie"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setCookie</span> (line <span class="line-number">480</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">setCookie</p>
<p class="description"><p>sets a cookie to store the current users  login details on the client side</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setCookie
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetOption" id="setOption"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setOption</span> (line <span class="line-number">984</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">setOption</p>
<p class="description"><p>sets an option to a specified value. updates the database  and the class's record of the options</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			setOption
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Thu, 07 Jun 2012 18:22:51 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>